package com.zbb.comm.po;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author itcast
 */
@Data
@TableName("message")
public class Message implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private String id;

    /**
     * 发送用户id
     */
    private String sendUserId;

    /**
     * 接收用户id
     */
    private String receivUserId;

    /**
     * 消息
     */
    private String message;

    /**
     * 创建时间
     */
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    public Message() {
    }

    public Message(String id, String sendUserId, String receivUserId, String message, LocalDateTime createTime) {
        this.id = id;
        this.sendUserId = sendUserId;
        this.receivUserId = receivUserId;
        this.message = message;
        this.createTime = createTime;
    }
}
